Proper connect_port
[juce-lv2.git] / juce / source / extras / the jucer / src / properties / jucer_ComponentChoiceProperty.h
blob3639141d6edc35b477ffbc83e58d0b6d7c9bb239
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCER_COMPONENTCHOICEPROPERTY_JUCEHEADER__
27 #define __JUCER_COMPONENTCHOICEPROPERTY_JUCEHEADER__
30 //==============================================================================
31 /**
33 template <class ComponentType>
34 class ComponentChoiceProperty : public ChoicePropertyComponent,
35 private ChangeListener
37 public:
38 ComponentChoiceProperty (const String& name,
39 ComponentType* component_,
40 JucerDocument& document_)
41 : ChoicePropertyComponent (name),
42 component (component_),
43 document (document_)
45 document.addChangeListener (this);
48 ~ComponentChoiceProperty()
50 document.removeChangeListener (this);
53 void changeListenerCallback (ChangeBroadcaster*)
55 refresh();
58 protected:
59 ComponentType* component;
60 JucerDocument& document;
64 #endif // __JUCER_COMPONENTCHOICEPROPERTY_JUCEHEADER__